<template>
	<view class="nobody" :style="{margin:top+'% 0;',left:mleft+'px'}">
		<view class="iconfont icontupianjiazaishibai02" :style="{'font-size':(size*3)+'px'}"></view>
	    <view class="tips":style="{'font-size':size+'px'}">{{tips}}</view>
		<slot></slot>
	</view>
</template>

<script>
	export default{
		props:{
			tips:{
				type:String,
				default:'没有数据'
			},
			top:{
				type:Number,
				default:10
			},
			size:{
				type:Number,
				default:16
			},
			mleft:{
				type:Number,
				default:0
			},
		},
		data(){
			return{
				w:0,
				h:0,
			}
		},
		created() {
			this.getWh();
			wx.onWindowResize(res=>{
				 this.getWh()
			})
		},
		  methods: {
			  getWh(){
			     uni.getSystemInfo({
			     	  success: (res) => {
			  		 this.w = res.windowWidth
			  		 this.h = res.windowHeight
			     	  }
			     })	
			  },	
		 }
		
	}
</script>

<style scoped>
	.nobody{
		position: absolute;
		width: 100%;
		text-align: center;
	}
	.icontupianjiazaishibai02{
		color: #888;
	}
	.tips{
		color: #333;
		text-align: center;
	}
</style>
